% TEST_ID: LANG-EXPAND-0014
% CATEGORY: language/array-ops/expand
% 测试 Cell 数组的扩展行为

function test_cell_expand
    % create a cell array {1}
    C = {1};

    % expand cell array to {1, [], 3}
    C{3} = 3;
    % the default value of the second cell is []
    assert(isempty(C{2}));

    % expand the second cell to [0, 0, 0, 0, 2]
    C{2}(5) = 2;
    assert(isequal(C{2}, [0, 0, 0, 0, 2]));
end